# 导包
import time

from selenium import webdriver
# 实例化浏览器驱动对象
driver = webdriver.Chrome()
# 打开测试网站
driver.get("http://192.168.0.108/Home/User/reg.html")
# 通过class属性定位元素
driver.find_element_by_xpath("//*[@class=\"inp fmobile J_cellphone\"]").send_keys("13125056588")
driver.find_element_by_xpath("//*[@class=\"inp imgcode J_imgcode\"]").send_keys("8888")
driver.find_element_by_xpath("//*[@class=\"inp fpass J_password\"]").send_keys("Dd112211")
# 等待3s
time.sleep(3)
# 退出浏览器
driver.quit()
